if(typeof Ext.user.method.binzhongidstore == 'undefined'){ Ext.user.method.binzhongidstore = Ext.user.method.binzhongid('/YuyueManage/data/'); }
if(typeof Ext.user.method.qudaostore == 'undefined'){ Ext.user.method.qudaostore = Ext.user.method.qudao(); }
if(typeof Ext.user.method.sexidstore == 'undefined'){ Ext.user.method.sexidstore = Ext.user.method.sexid(); }
if(typeof Ext.user.method.visitidstore == 'undefined'){ Ext.user.method.visitidstore = Ext.user.method.visitid(); }
Ext.user.yuyueManagecolumn = new Ext.grid.ColumnModel([
                    new Ext.grid.RowNumberer(),
					{xtype: 'gridcolumn', header: '编号',dataIndex: 'id',align: 'center',width: 85},
                    {xtype: 'gridcolumn', header: '时间',dataIndex: 'date',align: 'center',width: 85,renderer:Ext.user.method.date},
                    {xtype: 'gridcolumn', header: 'IP地址',dataIndex: 'ipaddr',width: 85},
                    {xtype: 'gridcolumn', header: '地区',dataIndex: 'city',width: 85},
                    {xtype: 'gridcolumn', header: '进入页',dataIndex: 'gopage',width: 200},
					{xtype: 'gridcolumn', header: '咨询页',dataIndex: 'askpage',width: 200},
					{xtype: 'gridcolumn', header: '搜索引擎/关键字',dataIndex: 'keyword',width: 120},
					{xtype: 'gridcolumn', header: '病种',dataIndex: 'binzhong',width: 85,renderer:Ext.user.renderer.binzhong},
					{xtype: 'gridcolumn', header: '咨询渠道',dataIndex: 'askway',width: 85,renderer:Ext.user.renderer.askway},
					{xtype: 'gridcolumn', header: 'QQ号（选填）',dataIndex: 'qq',width: 85},
					{xtype: 'gridcolumn', header: '咨询员',dataIndex: 'asker',width: 85},
					{xtype: 'gridcolumn', header: '预约号',dataIndex: 'yuyueid',width: 85},
					{xtype: 'gridcolumn', header: '姓名',dataIndex: 'name',width: 85},
					{xtype: 'gridcolumn', header: '代约人',dataIndex: 'proxyer',width: 85},
					{xtype: 'gridcolumn', header: '电话',dataIndex: 'phone',width: 85},
					{xtype: 'gridcolumn', header: '性别',dataIndex: 'sex',width: 85,renderer:Ext.user.renderer.sex},
					{xtype: 'gridcolumn', header: '年龄',dataIndex: 'year',width: 85},
					{xtype: 'gridcolumn', header: '专家',dataIndex: 'proficient',width: 85},
					{xtype: 'gridcolumn', header: '时间（起）',dataIndex: 'starttime',width: 85},
					{xtype: 'gridcolumn', header: '时间（止）',dataIndex: 'endtime',width: 85},
					{xtype: 'gridcolumn', header: '就诊号',dataIndex: 'Medicalnumber',width: 85},
					{xtype: 'gridcolumn', header: '就诊时间',dataIndex: 'Clinicaltime',width: 85},
					{xtype: 'gridcolumn', header: '回访情况',dataIndex: 'visit',width: 85,renderer:Ext.user.renderer.visit},
					{xtype: 'gridcolumn', header: '备注',dataIndex: 'comment',width: 300}
				]);
Ext.user.yuyuesearch = [
	{xtype:'panel',columnWidth: 0.06,items:[{xtype:'panel',style:'margin-left:5px;margin-right:5px;line-height:20px;',html:'入录时间:'},]},
	{xtype:'panel',columnWidth: 0.09,items:[{xtype:'datefield'}]},
	{xtype:'panel',columnWidth: 0.02,items:[{xtype:'panel',style:'line-height:20px;',html:'至'},]},
	{xtype:'panel',columnWidth: 0.09,items:[{xtype:'datefield'}]},
	{height:15,xtype:'panel',columnWidth: 1},//换行
	{xtype:'panel',style:'margin-left:5px;',columnWidth: 0.04,items:[{xtype:'button',text:'查  找'}]},
	{xtype:'panel',columnWidth: 0.04,items:[{xtype:'button',text:'本  月'}]},
	{xtype:'panel',columnWidth: 0.04,items:[{xtype:'button',text:'本  周'}]},
	{xtype:'panel',columnWidth: 0.04,items:[{xtype:'button',text:'今  天'}]},
];
//数据

Ext.user.yuyueManagedata = new Ext.data.JsonStore({
        fields: [
          'id','date','ipaddr','city','gopage','askpage','keyword','binzhong','askway','qq','asker','yuyueid','name','proxyer','phone','sex','year','proficient','starttime','endtime','Medicalnumber','Clinicaltime','visit','comment',
        ],
		storeId:'yuyueManageStore',
		autoLoad:true,
		url: Ext.user.baseUrl + '/YuyueManage/data/',
		root:'list',
		totalProperty: 'count',
    });
Ext.user.yuyueManage = Ext.extend(Ext.Panel, { 
    
	height:window.parent.Ext.getCmp('center_87').getHeight(),
	renderTo:'yuyuemanage_index',
	autoScroll:true,
	width:window.parent.Ext.getCmp('center_87').getWidth(),
    initComponent: function() {
        this.items = [
		{
			border:true,
			frame:true,
			xtype:'form',
			title:'用户列表',
			height:100,
			layout: 'column',
			items:Ext.user.yuyuesearch
		},{
                id:'yuyuemanage_index_grid',border:false,xtype: 'grid',title: '', store:'yuyueManageStore',height:500, columnLines: true, frame: true,trackMouseOver:true,
				columnLines:true,cm: Ext.user.yuyueManagecolumn,height:window.parent.Ext.getCmp('center_87').getHeight()-130,
			}	
        ];
		 this.bbar = new Ext.PagingToolbar({
            pageSize: Ext.sysconfig.pageSize,
            store: 'yuyueManageStore',
            displayInfo: true,
            displayMsg: Ext.sysconfig.pagemsg,
            emptyMsg: Ext.sysconfig.emptyList
			
        });		
        Ext.user.yuyueManage.superclass.initComponent.call(this);
    }
});

